﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Collections;
namespace CMS
{
    public class ShopItemCls
    {
        public string ProductCode;
        public string ProductNameVietnamese;
        public int Quantity;
        public decimal SalePriceVnd;
        public string Promotion = "";
        public string DatabaseId = "";
        public int ProductId;
        public string UnitName;
        public string Currency = "VNĐ";
        public decimal SubTotal
        {
            get
            {
                return SalePriceVnd * Quantity;
            }
        }
        public static ShopItemCls[] GetShoppingCarts()
        {
            ArrayList Arr = (ArrayList)System.Web.HttpContext.Current.Session["ArrayListCarts"];
            if (Arr == null) Arr = new ArrayList();
            ShopItemCls[] ShopItems = new ShopItemCls[Arr.Count];
            for (int iIndex = 0; iIndex < ShopItems.Length; iIndex++)
            {
                ShopItems[iIndex] = (ShopItemCls)Arr[iIndex];
            }
            return ShopItems;
        }


    }
}